const { default: axios } = require("axios");

const service = axios.create({
    baseURL: 'https://restapi.amap.com/v3/geocode/',
    timeout: 10000
})

service.interceptors.request.use(
    config => {
    //   config.headers['Content-Type'] = 'application/json; charset=utf-8';
    //   config.headers['Accept'] = '*/*';
    //   config.headers['Access-Control-Allow-Origin'] = '*';
      return config;
    },
    error => {
      console.error(error); // for debug
      return Promise.reject(error);
    }
  );

  export default service;